<f:view xmlns="http://www.w3.org/1999/xhtml"
    xmlns:h="http://java.sun.com/jsf/html"
    xmlns:f="http://java.sun.com/jsf/core"
    xmlns:ui="http://java.sun.com/jsf/facelets"
    xmlns:p="http://primefaces.org/ui">

	<h:head></h:head>

    <h:form>
	<h:panelGrid columns="4">  
		<h:outputLabel value="Search: "/>
		<p:inputText id="filterOut" value="#{testBean.filterOut}" >  
			<p:ajax event="keyup" update="fileList results" />
		</p:inputText>
		<p:watermark for="filterOut" value="for filename" />  
		<h:outputLabel id="results" value="#{testBean.fileCount}" />
	</h:panelGrid>
	
	<p:treeTable id="fileList" var="file" value="#{testBean.root}" scrollable="#{testBean.scrollable}" scrollHeight="#{testBean.scrollHeight}">
		<p:column>
			<f:facet name="header">Title</f:facet>
			<h:outputText value="#{file.title}" />
		</p:column>
	
		<p:column>
			<h:outputLink value="#{file.url}" rendered="#{ file.url != null }" >
				<h:outputText value="Download" />
			</h:outputLink>
		</p:column>

	</p:treeTable>
    </h:form>

</f:view>
